<script setup lang="ts">
import { ref } from 'vue'
import HqDialog from './components/HqDialog.vue'
import type { Data } from './types/types'

// 定义类型
const list = ref<Data[]>([
  { id: 1, name: '张小花', age: 18 },
  { id: 2, name: '孙大明', age: 19 },
  { id: 3, name: '刘德忠', age: 17 },
])

const list2 = ref<Data[]>([
  { id: 1, name: '赵小云', age: 18 },
  { id: 2, name: '刘蓓蓓', age: 19 },
  { id: 3, name: '姜肖泰', age: 17 },
])
</script>

<template>
  <!-- 传入自定义UI -->
  <!-- <HqDialog>
    <template #footer>
      <button>查看</button>
    </template>
  </HqDialog> -->
  <!-- 传入自定义UI -->
  <HqDialog :data="list2">
    <template v-slot="footer">
      <button>删除</button>
    </template>
  </HqDialog>
</template>

<style scoped>
body {
  background-color: #b3b3b3;
}
</style>
